package com.dong.ioc.javabased.lookup;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * description
 *
 * @author Administrator 2021/09/06 11:29
 */
@Configuration
public class AppConfig {

    @Bean
    public User user(){
        return new User();
    }

    @Bean
    public PersonManager personManager(){
        return new PersonManager() {
            @Override
            protected Person createdPerson() {
                return user();
            }
        };
    }
}
